<template>
  <el-submenu v-if="item.children" :index="item.path">
    <template slot="title">
      <i class="el-icon-menu"></i>
      <span slot="title">{{item.title}}</span>
    </template>
    <aside-item  v-for="item2 in item.children"   :item="item2" :key="item2.path"></aside-item>
  </el-submenu>
  <el-menu-item v-else :index="item.path">
    <i class="el-icon-location"></i>
    <span slot="title">{{item.title}}</span>
  </el-menu-item>
</template>

<script>
export default {
  name: "asideItem",
  props: ["item"]
};
</script>

<!--<template>-->
<!--  <el-submenu v-if="item.list" :index="item.url||item.icon">-->
<!--    <template slot="title">-->
<!--      <i class="el-icon-menu"></i>-->
<!--      <span slot="title">{{item.name}}</span>-->
<!--    </template>-->
<!--    <aside-item  v-for="item2 in item.list"   :item="item2" :key="item2.url"></aside-item>-->
<!--  </el-submenu>-->
<!--  <el-menu-item v-else :index="item.url">-->
<!--    <i class="el-icon-location"></i>-->
<!--    <span slot="title">{{item.name}}</span>-->
<!--  </el-menu-item>-->
<!--</template>-->

<!--<script>-->
<!--  export default {-->
<!--    name: "asideItem",-->
<!--    props: ["item"]-->
<!--  };-->

